home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-13 | 4.7 KB | 224 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: ODDesc.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * Classes defined in this interface
- *
- */
-
-
- #ifndef SOM_ODDesc_xh
- #define SOM_ODDesc_xh
-
- class ODDesc;
-
- #define ODDesc_MajorVersion 1
- #define ODDesc_MinorVersion 0
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_ODObject_xh
- #include <ODObject.xh>
- #endif
-
- #ifndef ODDesc_API
- #define ODDesc_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class ODFrame;
- class ODFacet;
- class ODObject;
- class ODExtension;
- class ODDesc;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define ODDescCClassData ODDescClassData
- #define ODDescNewClass(major,minor) somNewVersionedClassReference(ODDesc,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define ODDescMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the ODDesc class object, and the methods it introduces. */
- SOMEXTERN struct ODDescClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken InitODDesc;
- somMToken SetDescType;
- somMToken SetRawData;
- somMToken GetDescType;
- somMToken GetRawData;
- } SOMDLINK ODDescClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(ODDesc_Class_Source) && !defined(SOM_Module_oddesc_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list ODDescClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for ODDesc Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_ODDesc_InitODDesc)(ODDesc *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_ODDesc_SetDescType)(ODDesc *somSelf, Environment *ev,
- ODDescType descType);
- typedef void (* SOMLINK somTD_ODDesc_SetRawData)(ODDesc *somSelf, Environment *ev,
- ODByteArray* data);
- typedef ODDescType (* SOMLINK somTD_ODDesc_GetDescType)(ODDesc *somSelf, Environment *ev);
- typedef ODByteArray (* SOMLINK somTD_ODDesc_GetRawData)(ODDesc *somSelf, Environment *ev);
- }
-
- #endif /* ODDesc_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODDesc
- */
- class ODDesc : public ODObject
- {
- public:
-
- // ODDesc::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for ODDesc, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(ODDesc);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(ODDesc);
- #endif
- }
-
- // ODDesc::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: InitODDesc */
- void InitODDesc(Environment *ev)
- {
- SOM_ResolveD(this,ODDesc,ODDesc,InitODDesc)
- (this,ev);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: SetDescType */
- void SetDescType(Environment *ev,
- ODDescType descType)
- {
- SOM_ResolveD(this,ODDesc,ODDesc,SetDescType)
- (this,ev,descType);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: SetRawData */
- void SetRawData(Environment *ev,
- ODByteArray* data)
- {
- SOM_ResolveD(this,ODDesc,ODDesc,SetRawData)
- (this,ev,data);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetDescType */
- ODDescType GetDescType(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODDescType __somResult =
- SOM_ResolveD(this,ODDesc,ODDesc,GetDescType)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDesc,ODDesc,GetDescType)
- (this,ev);
- #endif
- }
-
- /* method: GetRawData */
- ODByteArray GetRawData(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODByteArray __somResult =
- SOM_ResolveD(this,ODDesc,ODDesc,GetRawData)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODDesc,ODDesc,GetRawData)
- (this,ev);
- #endif
- }
-
- }; /* ODDesc */
-
-
-
- #endif /* SOM_ODDesc_xh */
-